package com.ylr.blog.framework.controller.web;

import java.util.Map;

import com.ylr.base.common.tool.Result;
import com.ylr.blog.framework.service.BlogContentService;
import lombok.AllArgsConstructor;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.web.bind.annotation.*;

import com.ylr.blog.framework.entity.BlogContentEntity;


/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-05-23 22:23:59
 * className: BlogContentWebController
 * version: 1.0
 * description:
 */
@RestController
@RequestMapping("/web/blog-content")
@AllArgsConstructor
public class BlogContentWebController {

    private static final Logger log = LoggerFactory.getLogger(BlogContentWebController.class);

    private final BlogContentService blogContentService;

    /**
     * 保存
     */
    @PostMapping("/save")
    public Result<Object> saveBlogContent(@RequestBody BlogContentEntity blogContent) {
//        blogContentService.save(blogContent);

        return Result.success();
    }

    /**
     * 列表
     */
    @GetMapping("/page/list")
    public Result<Object> pageBlogContentList(@RequestParam Map<String, Object> params) {
//        PageUtils page = blogContentService.queryPage(params);

        return Result.success();
    }


    /**
     * 信息
     */
    @GetMapping("/get")
    public Result<Object> getBlogContent(@RequestParam("blogId") Long blogId) {
//		BlogContentEntity blogContent = blogContentService.getById(blogId);

        return Result.success();
    }

    /**
     * 修改
     */
    @PostMapping("/update")
    public Result<Object> updateBlogContent(@RequestBody BlogContentEntity blogContent) {
//		blogContentService.updateById(blogContent);

        return Result.success();
    }

    /**
     * 删除
     */
    @DeleteMapping("/delete")
    public Result<Object> deleteBlogContent(@RequestBody Long[] blogIds) {
//		blogContentService.removeByIds(Arrays.asList(blogIds));

        return Result.success();
    }

}
